package iO;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;

/**
 * @Author: Miyako
 * @Date: 2024-07-17-9:44
 * @Description: 字符输出流 OutputStreamWriter
 */
public class OSWriterDemo01 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fO1 = new FileOutputStream("1.txt");
        OutputStreamWriter OSW = new OutputStreamWriter(fO1, StandardCharsets.UTF_8);
        OSW.write("你说得对\n");
        OSW.write("但是");
        OSW.close();

    }
}
